package Task1;

public class Geilun extends role implements Weapon,Armor{

    public Geilun() {
    }

    public Geilun(String name, int HP, int MP) {
        super(name, HP, MP);
    }
    final int attack =25;
    final int skill1=60;
    final int skill2=100;
    final int skill1Pay=10;
    final int skill2Pay=30;


    @Override
    public void armorAttack(role r) {
        System.out.println("盖伦使用普通攻击对提莫造成了"+(attack-10)+"点伤害");
        System.out.println("消耗0MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=(attack-10);if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    @Override
    public void armorSkill1(role r) {
        System.out.println("盖伦使用审判对提莫造成了"+(skill1-10)+"点伤害");
        MP-=skill1Pay;
        System.out.println("消耗10MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=(skill1-10);if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    @Override
    public void armorSkill2(role r) {
        System.out.println("盖伦使用德玛西亚之力对提莫造成了"+(skill2-10)+"点伤害");
        MP-=skill2Pay;
        System.out.println("消耗30MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=(skill2-10);if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    @Override
    public void weaponAttack(role r) {
        System.out.println("盖伦使用普通攻击对提莫造成了"+(attack+10)+"点伤害");
        System.out.println("消耗0MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=(attack+10);if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    @Override
    public void weaponSkill1(role r) {
        System.out.println("盖伦使用审判对提莫造成了"+(skill1+10)+"点伤害");
        MP-=skill1Pay;
        System.out.println("消耗10MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=(skill1+10);if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    @Override
    public void weaponSkill2(role r) {
        System.out.println("盖伦使用德玛西亚之力对提莫造成了"+(skill2+10)+"点伤害");
        MP-=skill2Pay;
        System.out.println("消耗30MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-= (skill2+10);if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    public void attack(role r) {
        System.out.println("盖伦使用普通攻击对提莫造成了"+attack+"点伤害");
        System.out.println("消耗0MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=attack;if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }


    public void skill1(role r) {
        System.out.println("盖伦使用审判对提莫造成了"+skill1+"点伤害");
        MP-=skill1Pay;
        System.out.println("消耗10MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=skill1;if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

    public void skill2(role r) {
        System.out.println("盖伦使用德玛西亚之力对提莫造成了"+skill2+"点伤害");
        MP-=skill2Pay;
        System.out.println("消耗30MP，剩余"+MP+"MP");
        int HP=r.getHP();
        HP-=skill2;if(HP<0)HP=0;
        r.setHP(HP);
        System.out.println("提莫血量剩余"+HP);
        System.out.println("回合结束");
    }

}
